/* functions.h */

//#include <iostream>
#include <assert.h>

#include "main.h"

#ifndef		READPDB_FUNCTIONS_H
#define		READPDB_FUNCTIONS_H	

class CDiaBSTR {
    BSTR m_bstr;
    public:
       CDiaBSTR()         { m_bstr = NULL; }
       ~CDiaBSTR()        { if (m_bstr != NULL) SysFreeString( m_bstr ); }
       BSTR *operator &() { assert(m_bstr == NULL); return &m_bstr; }
       operator BSTR()    { assert(m_bstr != NULL); return m_bstr; }
};


void Fatal(const char*);
void parse(CComPtr<IDiaDataSource>, CComPtr<IDiaSession>, CComPtr<IDiaSymbol>, CComPtr<IDiaEnumTables>, const int = 0, const char** = NULL);

#endif